UCalgary Math Camp: Probability



Last updated for August 2024



Len Goff

Section 1: Probability & random variables

Random variables

CDF examples

CDF examples

CDF examples

A "typical CDF" for a continuous random variable with unbounded support

CDF examples

A "typical CDF" for a discrete random variable

CDF examples

Random variables may be a mix of continuous and discrete

Examples of density functions

Expectation

Expectation for a mixed distribution

Suppose that $$F(x) = p \cdot F_c(x) + (1-p) \cdot F_d(x),$$ where $F_c(x)$ is a differentiable CDF with density $f(x)$, and $F_d(x)$ is a discrete CDF with associated probability mass function $\pi_j$ for support points $x_j$.

Note that the definition of $\mathbb{E}[X]$ is linear in the CDF $F(x)$.

This implies that the expectation is equal to $p$ times an expectation according to $F_c$, plus $1-p$ times an expectation according to $F_d$: $$\mathbb{E}[X] = \int_{-\infty}^\infty x\cdot dF(x) = \color{orange}{p} \cdot \int_{-\infty}^\infty x\cdot f(x)\cdot dx + \color{orange}{(1-p)}\cdot \sum_{j} x_j \cdot \pi_j$$

Conditional distributions and expectations

Example: let $X$ and $Y$ be two uniform $[0,1]$ random variables that are independent. Then $$F_{XY}(x,y) = F_X(x)\cdot F_Y(y) = x\cdot y$$

Source: https://academo.org/demos/3d-surface-plotter/?expression=x*y&xRange=0%2C1&yRange=0%2C1&resolution=25

Example: let $X$ and $Y$ be two uniform "logistic" random variables that are independent. Then $$F_{XY}(x,y) = F(x)\cdot F(y) \textrm{ where } F(t) = \frac{1}{1+e^{-t}}$$

Source: https://academo.org/demos/3d-surface-plotter/?expression=1%2F((1%2Be%5E(-x))*(1%2Be%5E(-y)))&xRange=-5%2C5&yRange=-5%2C5&resolution=25

In the last example, the joint PDF is $$f_{XY}(x,y) = \frac{d}{dx}F(x)\cdot \frac{d}{dy}F(y) \textrm{ where } \frac{d}{dt}F(t) = \frac{e^{-t}}{(1+e^{-t})^2}$$

Source: https://academo.org/demos/3d-surface-plotter/?expression=e%5E(-x)%2F(1%2Be%5E(-x))%5E2*e%5E(-y)%2F(1%2Be%5E(-y))%5E2&xRange=-5%2C5&yRange=-5%2C5&resolution=25

Random vectors